package com.xjscrm.console.vo;

import com.xjscrm.common.enums.GenderEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Objects;

@ApiModel("首页客户性别统计返回对象")
@Data
public class CountCustomerGenderVo {
    @ApiModelProperty("性别（0-未知；1-男；2-女）")
    private Integer gender;
    @ApiModelProperty("数量")
    private Integer userCount;
    @ApiModelProperty("占比")
    private Double percentage;
    @ApiModelProperty("性别描述")
    private String genderDesc;

    public void setGenderDescByGender(){
      if(this.gender!=null){
          genderDesc=GenderEnum.getById(this.gender).getDesc();
      }
    }
}
